<template>
    <div>
        <button v-show="leftshow">{{ left }}</button>
        navbar-{{ myTitle }}    
        <button v-show="rightshow">{{ right }}</button>
       
    </div>
   
</template>

<script>
export default{
    // props:['myTitle','left','right','leftshow','rightshow'],
   props:{
       myTitle:String,
       left:[String,Number], //字符串和数字都可以
       right:{
        required:true, //必填项
        validator(value){
            // 检查value是否存在于数组['success','warning','danger']中
            return ['success','warning','danger'].includes(value)  
        }
       },       
       leftshow:{
        required:true,
        type:Boolean},
       rightshow:{
        type:Boolean,
        default:true}
   }
}
</script>